#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void print_board()
{
	int n = 0;
	scanf("%d", &n);
	int i = 0;
	int j = 0;
	for (j = 0; j <= n; j++)
	{
		if (j == 0)
		{
			printf("0");
		}
		else
		printf("% d", j);
	}
	printf("\n");
	for (j = 0; j < n; j++)
	{
		printf("%d ", j + 1);
		for (i = 0; i < n; i++)
		{
			if (i != n - 1)
				printf(" |");
			else
				printf(" ");
		}
		printf("\n");
		printf("  ");
		for (i = 0; i < n; i++)
		{
			if (j == n - 1)
				continue;
			else if (i == n - 1)
				printf("-");
			else
				printf("-|");
		}
		printf("\n");
	}

}

void in_board()
{

}
int main()
{
	print_board();
	in_board();
}